home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / SAMPLES / SCENEOP / SCOP / COMSCOP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  2.2 KB  |  66 lines

  1. /*$Id: COMScop.h 1.5 1997/05/12 19:13:58 damien Exp $*/
  2.  
  3. //
  4. // COM Example of a Scene Operation : stairs
  5. //
  6.  
  7. #ifndef __COMSCOP__
  8. #define __COMSCOP__  
  9.  
  10. #ifndef __I3DEXSCO__
  11. #include "I3DExScO.h"
  12. #endif
  13.                   
  14. // define the SceneOp CLSID
  15.  
  16. // {80DE4680-0ADB-11cf-A4F7-0000E202D5A5}
  17. DEFINE_GUID(CLSID_SceneOp,0x80de4680,0xadb,0x11cf,0xa4,0xf7,0x0,0x0,0xe2,0x2,0xd5,0xa5);
  18.  
  19. typedef struct SceneOpData {
  20.   short fNbStep;
  21.   NUM3D fDx;
  22.   NUM3D fDy;
  23.   NUM3D fDz;
  24.   } SceneOpData;
  25.  
  26.  
  27. // SceneOp Object :
  28. #undef INTERFACE
  29. #define INTERFACE SceneOp
  30. class SceneOp : public I3DExSceneOperation8 {
  31. public :  
  32.   SceneOp();
  33.   ~SceneOp();
  34.   
  35.   // IUnknown Interface :
  36.   STDMETHODIMP         QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
  37.   STDMETHODIMP_(ULONG) AddRef(THIS);
  38.   STDMETHODIMP_(ULONG) Release(THIS);
  39.   
  40.   // I3DExtension method :
  41.   STDMETHODIMP_(I3DExtension*) Clone(THIS);
  42.   STDMETHODIMP                 ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);  
  43.   
  44.   // I3DExDataExchanger methods :
  45.   STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
  46.   STDMETHODIMP_(void*)             GetExtensionDataBuffer(THIS);
  47.   STDMETHODIMP                     ExtensionDataChanged(THIS);
  48.   STDMETHODIMP                     HandleEvent(THIS_ ULONG sourceID);
  49.   STDMETHODIMP_(short)             GetResID(THIS);
  50.   
  51.   // I3DExSceneOperation methods
  52.   STDMETHODIMP           Prepare(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
  53.   STDMETHODIMP_(Boolean) DoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
  54.  
  55.   // I3DExSceneOperation methods
  56.   STDMETHODIMP           Prepare8(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total, Boolean* canUndo);
  57.     STDMETHODIMP_(Boolean) UndoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
  58.     STDMETHODIMP_(Boolean) RedoIt(THIS_ I3DShScene* scene, I3DShTreeElement* tree, I3DShSelection* selection, long index, long total);
  59. private :
  60.   ULONG           fCRef;      // reference Counter
  61.   SceneOpData     fData;      // Scene Operation Data
  62.   };
  63.  
  64.  
  65. #endif
  66.